

function sum(num1 ,num2) {

    if(typeof num1 != "number" || typeof num2 != "number") {
        throw '参数必须是数字！'
    }

    return num1+num2

}

var a = {'a':12}
var b = 17
console.log(sum(a, b))


